# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gnome-online-accounts
pkgver=3.44.0
pkgrel=0
pkgdesc="Single sign-on framework for GNOME"
url="https://wiki.gnome.org/Projects/GnomeOnlineAccounts"
# s390x and riscv64 blocked by gonme-desktop-dev -> gtk4
arch="all !s390x !riscv64"
license="GPL-2.0-or-later"
depends="dbus:org.freedesktop.Secrets"
makedepends="gnome-desktop-dev libxslt itstool libxml2-utils
	webkit2gtk-dev json-glib-dev rest-dev libsecret-dev
	docbook-xsl docbook-xml gobject-introspection-dev vala gtk-doc"
subpackages="$pkgname-dbg $pkgname-dev $pkgname-lang $pkgname-doc"
source="https://download.gnome.org/sources/gnome-online-accounts/${pkgver%.*}/gnome-online-accounts-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-media-server \
		--enable-lastfm \
		--enable-documentation \
		--enable-vala
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

dev() {
	provides="$pkgname-static=$pkgver-r$pkgrel"
	replaces="$pkgname-static"
	default_dev
}

sha512sums="
e70a83b557b816dc7eb22bcd1e4a263044a16c981dfa945a529250ea76e743c9cc73f2ecd4f3006d28a4f3161c7a15dba8bd1416b413c28f4d86d0192755e809  gnome-online-accounts-3.44.0.tar.xz
"
